<?php
/*error_reporting(0);*/
session_start();
$usuario = $_SESSION['S_USUARIO'];
if ($usuario == "") {
	header("exit.php");
	echo "<font face='Tahoma' size='2' color='red'><b>SESION CERRADA POR EL USUARIO!</b></font>";
	exit;
}
/*$_SESSION = array(); 
session_unset();*/
$session_name = session_name();
unset($_SESSION);
session_destroy();

if ( isset( $_COOKIE[ $session_name ] ) ) {
    if ( setcookie(session_name(), '', time()-3600, '/') ) {
		header ("Location: index.php");
        exit();   
    }
}

header ("Location: index.php"); 
?>
